// store/tokenStore.js
import { defineStore } from 'pinia';

export const useTokenStore = defineStore('token', {
    state: () => ({
        accessToken: null,
        refreshToken: null
    }),

    actions: {
        setAccessToken(token) {
            this.accessToken = token;
        },

        setRefreshToken(token) {
            this.refreshToken = token;
        },

        clearTokens() {
            this.accessToken = null;
            this.refreshToken = null;
        }
    }
});
